package com.tbit.uqbike.client.service.impl;

import com.tbit.uqbike.client.dao.core.UserBlackListDao;
import com.tbit.uqbike.client.pojo.UserBlackList;
import com.tbit.uqbike.client.service.UserBlackListService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Collections;
import java.util.List;
import java.util.Objects;

@Service("userBlackListService")
public class UserBlackListServiceImpl implements UserBlackListService {
    @Autowired
    private UserBlackListDao userBlackListDao;

    @Override
    public UserBlackList getByUserId(Integer userId) {
        return userBlackListDao.getByUserId(userId);
    }

    @Override
    public List<UserBlackList> getByIdNO(String idNO) {
        if(Objects.isNull(idNO)) {
            return Collections.emptyList();
        }
        return userBlackListDao.getByIdNO(idNO);
    }

}  